package com.qdu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qdu.entity.Homemessage;
import com.qdu.mapper.HomemessageMapper;
import com.qdu.service.HomemessageService;

/**
 * StudentService接口的实现类，包含了Student相关的业务�?�辑的实�?
 * @author Anna
 */
@Service
public class HomemessageServiceImpl implements HomemessageService {

	@Autowired
	private HomemessageMapper messageMapper;
	
	@Override
	public List<Homemessage> getmessageById(String uid,String hid) {
		return messageMapper.selectbyuidandhidanduid2(uid, hid);
	}

	@Override
	public List<Homemessage> getall() {
		return messageMapper.selectAll();
	}

	@Override
	public void addmessage(Homemessage message) {
		messageMapper.insert(message);
	}

	@Override
	public void updatemessage(Homemessage message) {
		messageMapper.update(message);
	}

	@Override
	public void deletemessage(String uid, String uid2, String hid) {
		messageMapper.delete(uid,uid2,hid);
	}

	

    
}
